how to print diagonal elements of a matrix in c